@model List<ToDo.Models.ItemViewModels>
@{
    ViewData["Title"] = "ShowAllItem";
}

<link href="~/css/Inventory.css" rel="stylesheet" />
<script src="~/js/index.js"></script>
<script src="~/js/bootbox.js"></script>

@if (Model.Count == 0)
{
    <h2 class="NoItems">无未完成事项</h2>
}
<ul class="showAllOverdueItem-ul">
    @foreach (var item in Model)
    {
        <li class="input-input-li" style="list-style-type:none">
            <a href="/Item/ChangeStatueInNotFinish?itemId=@item.ItemId" class="change">
                <div class="circle1">
                    <label class="radio-2">
                        <input type="radio" name="radio" value="1"><i></i>
                    </label>
                </div>
            </a>
            <a href="/Item/ChangeItem?itemId=@item.ItemId" title="修改事项">
                <span class="input-inventory-name">@item.Content</span>
            </a>
            <span class="input-inventory-time">@item.CreateTime.Month/@item.CreateTime.Day  @item.CreateTime.Hour:@item.CreateTime.Minute</span>
            <a onclick="deleteItem(@item.ItemId)" data-toggle="modal" data-target="#deleteItem">
                <img src="~/images/删除.png" width="20" height="20" />
            </a>
        </li>
    }
</ul>
<div class="modal fade" id="deleteItem">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">
                    你确定要删除吗？
                </h4>
            </div>
            <div class="modal-footer">
                <form action="/Item/DeleteItem">
                    <input type="hidden" name="itemId" id="itemId" />
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        取消
                    </button>
                    <button type="submit" class="btn btn-primary">
                        确定
                    </button>
                </form>
            </div>
        </div>
    </div>
</div>
